package cn.lj.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 李津
 * @since 2021-04-21
 */
@Data
  @EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
    @TableName("tb_finance_info")
@ApiModel(value="FinanceInfo对象", description="经费表实体类")
public class FinanceInfo implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "用户 id")
    @TableId(value = "id", type = IdType.AUTO)
      private Integer id;

    @ApiModelProperty(value = "报销人")
    @TableField(value = "claimer_user_id")
    private Integer claimerUserId;

    @ApiModelProperty(value = "事由")
    @TableField(value = "reason")
    private String reason;

    @ApiModelProperty(value = "余额")
    @TableField(value = "balance")
    private String balance;

    @ApiModelProperty(value = "记录人")
    @TableField(value = "recorder_user_id")
    private Integer recorderUserId;

    @ApiModelProperty(value = "逻辑删除 0=未删除 1=已删除")
    //当我们查询数据时，不希望查询标识是否删除的字段，我们可以通过如下方式快速解决。当然还可以使用Wrapper中的select表达式来排除某些查询字段，只是通过注解的方式更加方便。
    @TableField(value = "is_deleted")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty(value = "创建时间、报销时间")
    // 插入时自动填充
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    // 修改时自动填充
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updateTime;

    @ApiModelProperty(value = "报销金额数")
    @TableField(value = "sum")
    private String sum;

    @ApiModelProperty(value = "报销类型 1=支出 2=收入")
    @TableField(value = "type")
    private Integer type;

    @ApiModelProperty(value = "事由发生时间")
    @TableField(value = "reason_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date reasonTime;
}
